<%@ page language="java" contentType="text/html; charset=ISO-8859-1"
    pageEncoding="ISO-8859-1"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<form action="editPlayer.htm" method="post">
<input type="hidden" name="teamId" value="${model.team.id}"/>
<input type="hidden" name="idPlayer" value="${model.player.id}"/>

<c:if test="${model.status=='reserve'}">
<input type="hidden" name="reserve" value="1"/>
</c:if>
<c:if test="${model.status=='player'}">
<input type="hidden" name="reserve" value="0"/>
</c:if>

<table>

<tr><td>First Name</td><td><input type="text" name="firstName" value="${model.player.firstName}"/><td></tr>
<tr><td>Last Name</td><td><input type="text" name="lastName" value="${model.player.lastName}"/><td></tr>

<tr><td>Status</td><td>

<c:if test="${model.status=='reserve'}">
<select disabled="disabled">
<option value="0">Player</option>
<option value="1" selected="selected">Reserve</option>
</select>
<td></tr>
</c:if>
<c:if test="${model.status=='player'}">
<select disabled="disabled">
<option value="0" selected="selected">Player</option>
<option value="1">Reserve</option>
</select>
<td></tr>
</c:if>

<c:if test="${model.status=='reserve'}">
<tr><td>Commision</td><td><input type="text" name="salary" value="${model.player.commission}"/><td></tr>
</c:if>
<c:if test="${model.status=='player'}">
<tr><td>Salary</td><td><input type="text" name="salary" value="${model.player.salary}"/><td></tr>
</c:if>

<tr><td>Image</td><td><input type="file" name="image" value="${model.photo}"/><td></tr>
<tr><td></td><td><input type="submit" value="Save"/></td></tr>
</table>
</form>
